-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore status fields during drift detection #2522
Conversation
03f433c
to
2fbbac3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix :)
3fa491a
to
e985455
Compare
e985455
to
79b73ec
Compare
e2e/drift/drift_test.go
Outdated
Context("Resource manifests containing status fields", func() { | ||
It("Is marked as not ready", func() { | ||
bundleName := "drift-correction-test-drift-ignore-status" | ||
Eventually(func() bool { | ||
b := getBundle(bundleName, k) | ||
return b.Status.Summary.Ready == 1 | ||
}).Should(BeTrue()) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with an older version, and checked that it fails. The bundle never reaches a ready status:
❯ kubectl get bundle -n fleet-local -w drift-correction-test-drift-ignore-status
NAME BUNDLEDEPLOYMENTS-READY STATUS
drift-correction-test-drift-ignore-status 0/1 Modified(1) [Cluster fleet-local/local]; deployment.apps drift-ignore-status/nginx-deployment modified {"status":{"collisionCount":0}}
ace0807
to
0478e62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Refers to #2521
Use a new
StatusNormalizer
when comparing deployed resources against the desired spec, sincestatus
is normally not part of it.